<?php
/**
 * Created by PhpStorm.
 * User: HelloWorld
 * Date: 2019/09/26
 */

require_once LIBRARY_DIR . '/vendor/autoload.php';

class Func_MakePdf_Mpdf{
    //生成pdf
    public static function make($tpl,$path){
        $mpdf = new \Mpdf\Mpdf(["autoScriptToLang"=>true, "autoLangToFont"=>true]);
        $mpdf->WriteHTML($tpl);
        $mpdf->Output($path);
        unset($mpdf);
    }
}